import { defHttp } from "/@/utils/http/axios"
import { Modal } from "ant-design-vue"

enum Api {
  releaseMenu = "/infra-service/mpMenu/releaseMenu",
  list = "/infra-service/mpMenu/listMenu",
  delete = "/infra-service/mpMenu/deleteMenu",
}

/**
 * 保存并发布菜单
 * @param params
 */
export const releaseMenu = (params) => defHttp.post({ url: Api.releaseMenu, params })

export const listMenu = (params) => defHttp.get({ url: Api.list, params })

/**
 * 删除
 */
export const deleteMenu = (params) => {
  return defHttp.delete({ url: Api.delete, params }, { joinParamsToUrl: true })
}
